#pragma once

#include <gofcl_usbfs_dieptflen.h>

typedef struct {
	u32_s size_32b_nums : 16;
	u32_s addr_32b_no : 16;
} usbfs_dieptflen_expl_s;

_Static_assert(sizeof(usbfs_dieptflen_expl_s) == 4,
	       "Struct usbfs_dieptflen_expl_s defined error!");

static inline void usbfs_set_in_fifo_len(usbfs_dieptflen_re re,
					 usbfs_dieptflen_expl_s deptflen) {
	union {
		usbfs_dieptflen_expl_s e;
		usbfs_dieptflen_s d;
	} du = {
		.e = deptflen,
	};
	usbfs_wreg_dieptflen_s(re, du.d);
}
